equations for arithmetic sequences